package com.example.exam.pojo;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonIgnore;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

/**
 * @author
 * @date 2023/03/05
 *
 * 答案
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
@TableName
public class TestPaper implements Comparable<TestPaper> {

    /**
     * 主键
     */
    @JsonIgnore
    @TableId(type = IdType.AUTO)
    private Integer id;

    /**
     * 手机号或学号
     */
    @JsonIgnore
    private String sid;

    /**
     * 题号
     */
    private Integer tid;

    /**
     * 答案
     */
    private String answer;

    @Override
    public int compareTo(TestPaper o) {
        return this.getTid() - o.getTid();
    }
}
